Motor Driver for Haptics QC
Quality Check for 8 motor board
1. Write the firmware to PIC32MK by a PC with PICkit3.
1.1 Install MPLAB IPE v6.15
IPE come with IDE.
1.2 Start MPLAB IPE
https://gyazo.com/906d5b918a990bdebbc88a692b7fb119
1.2. Move to Advanced Mode
Click menu "Settings-Advanced Mode"
https://gyazo.com/12cb5a4aca66714b9226e0a265d41b2d
Enter "microchip" as the password.
https://gyazo.com/235e8615f836da3f51fd6dac9843eae1
1.3 Choose device and tool
Connect PICkit3.
Choose Family and Device as below.
PICkit3 will shown in Tool. So, choose it.
https://gyazo.com/fde15b97521324f8476e53b206462183
1.4. Power setting
Click the left "Power" button and press Power Settings. Check "power target circuit from PICkit3" and adjust the voltage level.
https://gyazo.com/fae565f1ae137d7e86d5072e8d61c377
1.5. Select a hex file.
Click the left "Operate" button and click the "Browse" button for "Hex File". Then choose the downloaded hex file.
https://gyazo.com/3b97f00a3be675aa1837be3817f4c9d1
1.6. Connect to PICkit3
Connect PICkit3 to PC and connect the board and PIC kit3.
Push the connector softly to keep the contacts.
https://gyazo.com/d9d3d60e373a5bd8edcb09650a730a7e
Click the "Connect" button.
https://gyazo.com/52f206639b9f5763935a8e3cb98830ab
Then, the "Output - IPE" tab will shows:
Connecting to MPLAB PICkit 3...
Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.56.09
Firmware type..............PIC32MZ
Programmer to target power is enabled - VDD = 3.250000 volts.
Target device PIC32MK0512MCJ064 found.
Device ID Revision = A1
DEVSN0 = 0100010c
DEVSN1 = 50434239
1.7. Program the firmware
- Click Program button.
https://gyazo.com/4553121e536075b57d25d6da2a22777b
Then, the "Output - IPE" tab will shows:
2023-12-11 14:44:39 +0900 - Programming...
Device Erased...
Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x1d000000, end address = 0x1d00dfff
boot config memory
configuration memory
Programming/Verify complete
2023-12-11 14:44:49 +0900 - Programming complete
*** Hold In Reset mode is enabled ***
2. Connect the board to the PC via the USB-UART board.
2.1 Connect UART
Connect the USB-UART board to the "UART1" connector on the board using a FFC cable and the Power cable.
Connect the USB-UART board and the PC with a USB micro B cable.
https://gyazo.com/80a35e76cc29ce08c69d41125370b12c
https://gyazo.com/f2807644cdf6a3bed0c6caba941c3bef
2.2 Download and run the test software on Windows.
Run PCController.exe
https://gyazo.com/8310ff05f9f014863d144f9886a95209
2.3 Check UART port.
Click the Dropdown list of "UART port#" and select the correct COM port. If there are multiple ports, please unplug USB-UART from the PC once and check the list—the port that disappeared is what we want to use.
Click "List borads" button. You will see "#1M8C0F4" and 10 white panels.
https://gyazo.com/d77a2ead2974c6b060153652770ee8b8
Remove FFC from the board.
Connect the FFC cable to the "UART0" connector on the board.
Click "List borads" button. You will see "#1M8C0F4" and 10 white panels again.
3. Test 8 motor connectors
Connect motor to one of the motor connectors (MC0 ~ MC7) by FFC.
https://gyazo.com/a2688048853c7134392f5f4e700f1e14
Click "Drive and Measure" button. Then the motor will rotate and you will see the sensor outputs.
https://gyazo.com/4392eaca06257555e3c506642c2c64a2
Check the output of the corresponding panel (Top row, left to right: MC0-MC2, Second row: MC3-MC5, Third row: MC6, MC7, FS1, fourth row: FS2)
If the graphs in the correponding panel is similar to the above. The motor connector is good. Otherwise, there will be some connection error.
Repeat for all motor connectors.
4. Check 2 force sensor connectors
Connect the motor to one of the FS connectors (FS0 ~ FS1) by FFC.
Click "Measure" button and rotate the motor by hand.
Then, you will see graphs similar to the 9th panel below.
https://gyazo.com/3cd811f64cf0d057a5503cbe6c7acd68https://gyazo.com/3cd811f64cf0d057a5503cbe6c7acd68
A video for FS connectors; rotate the motor by hand.
https://scrapbox.io/files/6576b911aa631d00244b0a4d.mp4